-
Notifications
You must be signed in to change notification settings - Fork 952
[WIP] Refactor Dockerfile #8429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
I'm removing the manual handling of ENTRYPOINT [ "/usr/bin/tini", "-g", "--", "./entrypoint.sh" ] becomes: ENTRYPOINT ["/entrypoint.sh"] and the user is free to run the container with tini by using the official docker run --init ... |
30c3c61
to
db48b79
Compare
The Dockerfile now should also support building the image from any host architecture as well. It previously only suppported amd64 to any. now it should be any to any, but I've no way of testing it |
008f67c
to
ac0910c
Compare
I'd like to explore ways to not include the .git/ folder (aka placing it in the .dockerignore). Maybe we can add an option to the Makefile that doesn't call |
e264a55
to
c145582
Compare
Nice changes, and with the switch to |
i dont want to undraft until these issues are addressed:
|
71ca3c8
to
66a9497
Compare
When compiling for armv7 I'm getting this unaligned access error: #49 7.927 checking for unaligned access to int... ccan/tools/configurator/configurator: Test for HAVE_UNALIGNED_ACCESS did not compile:
#49 7.959 configuratortest.c: In function 'main':
#49 7.959 configuratortest.c:8:22: error: array subscript 'int[0]' is partly outside array bounds of 'char[4]' [-Werror=array-bounds]
#49 7.959 8 | return *x == *y;
#49 7.959 | ^~
#49 7.959 configuratortest.c:5:11: note: at offset 1 into object 'pad' of size 4
#49 7.959 5 | char pad[sizeof(int *) * 1];
#49 7.959 | ^~~
#49 7.959 cc1: all warnings being treated as errors
#49 7.960
#49 ERROR: process "/bin/bash -euo pipefail -c ./configure --prefix=/tmp/lightning_install --enable-static --disable-compat --disable-valgrind" did not complete successfully: exit code: 3 This is because armv7 does not guarantee unaligned access support, so the compilation should rightfully fail. Now i wonder, are we sure that this repo is meant for armv7 as well? should we remove armv7 support completely? as far as I know it is only useful for raspberry pi 1 and 2. Raspberry PI's 3,4,5 have armv8 64bit. I think someone should check if this compilation still works: (https://github.com/ElementsProject/lightning/blob/master/doc/getting-started/getting-started/installation.md#to-cross-compile-for-raspberry-pi) |
5ade525
to
7f7af77
Compare
@cdecker Adding a non-root Hardcoding the UID inside the Dockerfile creates a fragile assumption and can easily lead to permission issues. Some repos such as mempool do just that, but I don't deem it robust. I have fought with docker user permissions for years, and when there are volumes involved, unless using docker-compose, the best thing is running as root. Other ways are hacky workarounds that involve setting UID and GID specifically. docker-compose can abstract away these hacks but it's not our case |
efabc75
to
7f7af77
Compare
53cb2ce
to
4c2bc89
Compare
95545a5
to
d0140cc
Compare
This is a draft PR to refactor the dockerfile according to issue #8409
changes:
ADD
instead ofcurl
SHELL
tee
+ heredocs instead of messy echo'stini
in favor of docker--init
flagmake
and submodules cloningclippy
andrust-doc
componentsImprovements: